<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script type="text/javascript">
		var arr = [{
			days: "2018-11-28",
			id: 166,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "11:00、12:00",
			user_id: 3
		}, 
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "9:00、10:00",
			user_id: 3,
		},
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "16:00、17:00",
			user_id: 3,
		},  
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "14:00、15:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-28",
			id: 168,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "16:00、17:00、18:00",
			user_id: 3,
		},
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "10:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "11:00、12:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-03",
			id: 161,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/cdb5b0718adc5f96995adae7a728a744.jpg",
			model_id: 2,
			name: "神经病",
			status: 1,
			times: "13:00、14:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-23",
			id: 150,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "9:00、10:00、11:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-23",
			id: 150,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "12:00、13:00、14:00",
			user_id: 3,
		}, 
		{
			days: "2018-11-24",
			id: 149,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "10:00、16:00、21:00",
			user_id: 3,
		}, 
		{
			days: "2018-12-04",
			id: 162,
			img: "http://modelplus.wx-plus.cn/public/upload/img/20181101/f27cd3716e375070a335eb8203a8d9ec.png",
			model_id: 11,
			name: "大小兄弟",
			status: 1,
			times: "9:00",
			user_id: 3,
		}]


		let temArr = []
		let resArr = []
		// 利用缓存机制排序
		arr.map(item=>{
			let key = item.days;
			if(!temArr[key]){
				temArr[key] = item;
			}else{
				temArr[key]['times'] =  temArr[key]["times"] + '、' + item['times']
			}
		})


		for(let i in temArr){
			resArr.push(temArr[i])
		}

		// console.log(...resArr);
		console.log(temArr)
		console.log(resArr)
</script>	
</body>
</html>